<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="application/json, text/plain, */*; charset=utf-8" />
<meta http-equiv="Accept" content="application/json, text/plain, */*" />

<title>Baby Logs</title>
<script src="https://code.angularjs.org/1.2.21/angular.js" type="text/javascript"></script>
<script src="js/ng-mobile/js/mobile-angular-ui.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script src="js/fetch-controller.js" type="text/javascript"></script>
<script src="js/save-controller.js" type="text/javascript"></script>
</head>
<body data-ng-app="babyApp">
	<div data-ng-controller="FetchController">

		<table border="3">
			<thead>
				<tr>
					<td>Action</td>
					<td>Date</td>
					<td>Time</td>
					<td>&nbsp;&nbsp;LB&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;RB&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;PM&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;FM&nbsp;&nbsp;</td>
					<td>Diapers</td>
				</tr>
			</thead>
			<tbody>
				<tr data-ng-repeat='log in logs track by $index'>
					<td>&nbsp;&nbsp;<a data-ng-href="#" data-ng-click="deleteLog(log.id)"> - </a>&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;{{log.timestamp | date : "MMM dd yyyy"}}&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;{{log.timestamp | date : "hh:mm a"}}&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;{{log.leftBreast}}&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;{{log.rightBreast}}&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;{{log.pumped}}&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;{{log.formula}}&nbsp;&nbsp;</td>
					<td>&nbsp;&nbsp;{{log.diaper}}&nbsp;&nbsp;</td>
				</tr>
			</tbody>
		</table>
	</div>
	<br />

	<div data-ng-controller="SaveController">
		<!-- <slider floor="0" ceiling="60" step="1" precision="0" data-ng-model="newLog.leftBreast"></slider> -->
		<table border="4">
			<tbody>
				<tr>
					<td>TIME</td>
					<td><input type="date" data-ng-model="timestampString" /></td>
				</tr>
				<tr>
					<td>LB</td>
					<td><input type="text" data-ng-model="newLog.leftBreast" /></td>
				</tr>
				<tr>
					<td>RB</td>
					<td><input type="text" data-ng-model="newLog.rightBreast" /></td>
				</tr>
				<tr>
					<td>PM</td>
					<td><input type="text" data-ng-model="newLog.pumped" /></td>
				</tr>
				<tr>
					<td>FM</td>
					<td><input type="text" data-ng-model="newLog.formula" /></td>
				</tr>
			</tbody>
		</table>
		<br />
		<button data-ng-click="saveLog()">Log Data</button>
	</div>

	<!-- 	
	<script src="js/ng/angular.js" type="text/javascript"></script>
	<script src="js/ng/angular-route.js" type="text/javascript"></script>
 -->
</body>
</html>